/**
 * author: wancheng
 * date: 2018/08/3
 * des: 考勤管理-年假管理
 */
import request from '@/utils/request'

export function getAttendanceList(data) {
  return request({
    url: '/yearholidays/findAll',
    method: 'get',
    params: data
  })
}


/**
 * 获取员工的入职日期
 */
export function getEmployeeDetail(id) {
  return request({
    url: '/hr/employeemanage/employees/find?employeeNo=' + id,
    method: 'get'
  })
}


/**
 * 年假，新增
 *
 * @param {} data
 */
export function addLeave(data) {
  return request({
    url: '/yearholidays/insert',
    method: 'post',
    params: data
  })
}

/**
 * 年假,编辑
 *
 * @param {} data
 */
export function editLeave(data) {
  return request({
    url: '/yearholidays/update',
    method: 'put',
    data
  })
}
/**
 * 查询年假详情
 * @param {*} id
 */
export function findDetail(id) {
  return request({
    url: '/yearholidays/find/' + id,
    method: 'get'
  })
}


/**
 * 删除年假
 * @param {*} id
 */
export function detailDate(id) {
  return request({
    url: '/yearholidays/delete/' + id,
    method: 'delete'
  })
}






